//
//  QRcodeViewController.m
//  SouthChina
//
//  Created by kc on 15/8/3.
//  Copyright (c) 2015年 科创. All rights reserved.
//

#import "QRcodeViewController.h"


@interface QRcodeViewController ()

@end

@implementation QRcodeViewController
@synthesize headImg;

- (void)viewDidLoad {
    [super viewDidLoad];
    //背景半透明
    [self.view setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5f]];
    
    UIView * viewBody = [[[NSBundle mainBundle] loadNibNamed:@"QRcodeViewBOdy" owner:self options:nil] objectAtIndex:0];
    viewBody.frame = (CGRect){(SCREEN_WIDTH-100)/2, (SCREEN_HEIGHT-TITLE_BAR_HEGIHT-YNEW-100)/2,100,100};
    viewBody.backgroundColor = [UIColor clearColor];
    [self.view addSubview:viewBody];
    
    _QRcodeImg.layer.masksToBounds = YES;
    _QRcodeImg.layer.cornerRadius = 8.0;
    NSURL *url= [NSURL URLWithString: [_strurl hasPrefix:@"http"]?_strurl:[NSString stringWithFormat:@"%@%@",DE.fileEngineeUrl,_strurl]];
    [_QRcodeImg setImageWithURL:url placeholderImage:[UIImage imageNamed:@"empty_photo"]];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
